package Date1205;
import java.util.Scanner;

public class Demo1{//杨辉三角
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] yh= new int[n][n];
        for (int i = 0; i < n; i++){
            for(int j = 0;j<= i;j++){
                if (j==0 || j==i){
                    yh[i][j]=1;
                     
                }else{
                    yh[i][j]=yh[i-1][j-1]+yh[i-1][j];
                }
                System.out.print(yh[i][j]+" ");
            }
            System.out.println();
        }  
        
    }
}